.class Lrexsee/network/RexseeBluetooth$ListenerForConnection;
.super Ljava/lang/Thread;
.source "RexseeBluetooth.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lrexsee/network/RexseeBluetooth;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "ListenerForConnection"
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/network/RexseeBluetooth;


# direct methods
.method private constructor <init>(Lrexsee/network/RexseeBluetooth;)V
    .locals 0

    .prologue
    .line 935
    iput-object p1, p0, Lrexsee/network/RexseeBluetooth$ListenerForConnection;->this$0:Lrexsee/network/RexseeBluetooth;

    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lrexsee/network/RexseeBluetooth;Lrexsee/network/RexseeBluetooth$ListenerForConnection;)V
    .locals 0

    .prologue
    .line 935
    invoke-direct {p0, p1}, Lrexsee/network/RexseeBluetooth$ListenerForConnection;-><init>(Lrexsee/network/RexseeBluetooth;)V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 3

    .prologue
    .line 938
    :cond_0
    :goto_0
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth$ListenerForConnection;->this$0:Lrexsee/network/RexseeBluetooth;

    # getter for: Lrexsee/network/RexseeBluetooth;->mConnectState:I
    invoke-static {v1}, Lrexsee/network/RexseeBluetooth;->access$5(Lrexsee/network/RexseeBluetooth;)I

    move-result v1

    const/4 v2, 0x2

    if-eq v1, v2, :cond_1

    iget-object v1, p0, Lrexsee/network/RexseeBluetooth$ListenerForConnection;->this$0:Lrexsee/network/RexseeBluetooth;

    # getter for: Lrexsee/network/RexseeBluetooth;->mServerSocket:Landroid/bluetooth/BluetoothServerSocket;
    invoke-static {v1}, Lrexsee/network/RexseeBluetooth;->access$6(Lrexsee/network/RexseeBluetooth;)Landroid/bluetooth/BluetoothServerSocket;

    move-result-object v1

    if-nez v1, :cond_2

    .line 950
    :cond_1
    :goto_1
    return-void

    .line 940
    :cond_2
    :try_start_0
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth$ListenerForConnection;->this$0:Lrexsee/network/RexseeBluetooth;

    iget-object v2, p0, Lrexsee/network/RexseeBluetooth$ListenerForConnection;->this$0:Lrexsee/network/RexseeBluetooth;

    # getter for: Lrexsee/network/RexseeBluetooth;->mServerSocket:Landroid/bluetooth/BluetoothServerSocket;
    invoke-static {v2}, Lrexsee/network/RexseeBluetooth;->access$6(Lrexsee/network/RexseeBluetooth;)Landroid/bluetooth/BluetoothServerSocket;

    move-result-object v2

    invoke-virtual {v2}, Landroid/bluetooth/BluetoothServerSocket;->accept()Landroid/bluetooth/BluetoothSocket;

    move-result-object v2

    invoke-static {v1, v2}, Lrexsee/network/RexseeBluetooth;->access$7(Lrexsee/network/RexseeBluetooth;Landroid/bluetooth/BluetoothSocket;)V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    .line 945
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth$ListenerForConnection;->this$0:Lrexsee/network/RexseeBluetooth;

    # getter for: Lrexsee/network/RexseeBluetooth;->mSocket:Landroid/bluetooth/BluetoothSocket;
    invoke-static {v1}, Lrexsee/network/RexseeBluetooth;->access$8(Lrexsee/network/RexseeBluetooth;)Landroid/bluetooth/BluetoothSocket;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 946
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth$ListenerForConnection;->this$0:Lrexsee/network/RexseeBluetooth;

    iget-object v2, p0, Lrexsee/network/RexseeBluetooth$ListenerForConnection;->this$0:Lrexsee/network/RexseeBluetooth;

    # getter for: Lrexsee/network/RexseeBluetooth;->mSocket:Landroid/bluetooth/BluetoothSocket;
    invoke-static {v2}, Lrexsee/network/RexseeBluetooth;->access$8(Lrexsee/network/RexseeBluetooth;)Landroid/bluetooth/BluetoothSocket;

    move-result-object v2

    invoke-virtual {v2}, Landroid/bluetooth/BluetoothSocket;->getRemoteDevice()Landroid/bluetooth/BluetoothDevice;

    move-result-object v2

    invoke-static {v1, v2}, Lrexsee/network/RexseeBluetooth;->access$9(Lrexsee/network/RexseeBluetooth;Landroid/bluetooth/BluetoothDevice;)V

    .line 947
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth$ListenerForConnection;->this$0:Lrexsee/network/RexseeBluetooth;

    # getter for: Lrexsee/network/RexseeBluetooth;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v1}, Lrexsee/network/RexseeBluetooth;->access$1(Lrexsee/network/RexseeBluetooth;)Lrexsee/core/browser/Browser;

    move-result-object v1

    iget-object v1, v1, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v2, "onBluetoothReceivedConnectRequest"

    invoke-virtual {v1, v2}, Lrexsee/core/browser/clazz/EventList;->run(Ljava/lang/String;)V

    goto :goto_0

    .line 941
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 942
    .local v0, "e":Ljava/io/IOException;
    iget-object v1, p0, Lrexsee/network/RexseeBluetooth$ListenerForConnection;->this$0:Lrexsee/network/RexseeBluetooth;

    # getter for: Lrexsee/network/RexseeBluetooth;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v1}, Lrexsee/network/RexseeBluetooth;->access$1(Lrexsee/network/RexseeBluetooth;)Lrexsee/core/browser/Browser;

    move-result-object v1

    iget-object v2, p0, Lrexsee/network/RexseeBluetooth$ListenerForConnection;->this$0:Lrexsee/network/RexseeBluetooth;

    invoke-virtual {v2}, Lrexsee/network/RexseeBluetooth;->getInterfaceName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2, v0}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_1
.end method
